package com.pirestupppai.imagetool;

import android.graphics.Bitmap;
import android.graphics.Matrix;
import android.graphics.PointF;
import android.graphics.RectF;

public class CustomStickerModel {
	//Matrix.MSKEW_X 控制X坐标的线性倾斜系数
	//Matrix.MSKEW_Y 控制Y坐标的线性倾斜系数
	//Matrix.MTRANS_X//左上顶点X坐标
	//Matrix.MTRANS_Y//左上顶点Y坐标
	//Matrix.MSCALE_X//宽度缩放倍数
	//Matrix.MSCALE_Y//高度缩放位数
	private int id;//唯一标识，实际项目中可替换为url
	public float startDis;// 开始距离
	public PointF midPoint;// 中间点
	public float oldRotation = 0;
	public float rotation = 0;
	public PointF startPoint = new PointF();
	public Matrix matrix;
	public Bitmap bitmap;
	public float originPoint[];           //  用于绘制图片的背景框

	public RectF originRectF;

	public CustomStickerModel(Bitmap bitmap) {
		this.bitmap = bitmap;

		float px = bitmap.getWidth();
		float py = bitmap.getHeight();

		originPoint = new float[]{0, 0, px, 0, px, py, 0, py, px / 2, py / 2};
		originRectF = new RectF(0, 0, px, py);
		matrix = new Matrix();
	}

	public Bitmap getBitmap() {
		return bitmap;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}
}
